const userModel = require('../DBconfig/dbMysql.js');

var api1 = async (ctx, next) => {
    let  resd = ''
    await userModel.findAllPost()
        .then(result => {
            resd = JSON.parse(JSON.stringify(result))
            // console.log(resd)
        });
    // let  _sql = `
    //     SELECT * FROM hez1
    // `
    // return query(_sql)
    ctx.body = resd;
};

module.exports = {
    'GET /api': api1,
};